package com.ruoyi.ldzlsb.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Web MVC 配置
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    /**
     * 配置静态资源映射
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 配置设备图片访问路径映射
        registry.addResourceHandler("/equipment-images/**")
                .addResourceLocations("file:/Users/mryan/Pictures/equipment-images/");
    }
}
